import requests
from bs4 import BeautifulSoup

url = input("请输入要爬取的网址：")
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html')
print('请输入要获取的标签（如p，div，img等）')
tag = input()
print('请输入要获取的属性（如class，id，src等）')
attribute = input()
information = soup.find_all(tag, {attribute: True})
for info in information:
    print(info.get(attribute))
